/* 
该模块是路由器模块，用于管理Ui路由，配置新页面在这里配置路由即可
*/
const {Router} = require('express')
let router = new Router()
//引入path模块，path是node中的核心模块，无需下载
let {resolve} = require('path')

//登录UI路由,仅仅就是为了显示页面
router.get('/login',(request,response) =>{
   let filePath =  resolve(__dirname,'../public/login.html')//1.起始点，2.从哪开始找
    response.sendFile(filePath)
})
//注册UI路由
router.get('/register',(request,response) =>{
    let filePath =  resolve(__dirname,'../public/register.html')
    response.sendFile(filePath)
})

module.exports = router